package avicti.bdp.dto.org;

import avicti.bdp.dto.org.OrganizationDTO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.persistence.Embeddable;
import javax.validation.constraints.Pattern;

/**
 * 集团内部管理信息
 *
 * @author Pierre REN
 */
@Embeddable
public class GroupInternalManagementInfo {
    /**
     * 集团内部管理属性
     */
    private String groupInternalManagementType;

    /**
     * 管理层级
     */
    @Pattern(regexp = "^[0-9]*$", message = "管理层级 必须为整数")
    private int managementLevel;

    /**
     * 同级排序号
     */
    @Pattern(regexp = "^[0-9]*$", message = "同级排序号 必须为整数")
    private int siblingOrderNumber;

    /**
     * 组织产权级次
     */
    @Pattern(regexp = "^[0-9]*$", message = "组织产权级次 必须为整数")
    private int propertyManagementLevel;
    // add by huyong 2024年9月29日09:48:45 因专项要求 取消是否财务并表 是否纳入决算标志
    /**
     * 是否财务并表
     */
    @JsonProperty("isIncludedForFinancialConsolidation")
    @JsonIgnore
    private boolean isIncludedForFinancialConsolidation;

    /**
     * 是否纳入决算标志
     */
    @JsonProperty("isIncludedForFinancialStatement")
    @JsonIgnore
    private boolean isIncludedForFinancialStatement;

    /**
     * 集团统一品牌授权使用形式
     */
    private String groupBrandUsageAuthorization;

    // add by huyong 2024年9月29日09:48:45 因专项要求 在集团内部管理属性中添加 隶属二级单位（产权关系）
    private OrganizationDTO belongSecondLevelUnit;

    public OrganizationDTO getBelongSecondLevelUnit() {
        return belongSecondLevelUnit;
    }

    public void setBelongSecondLevelUnit(OrganizationDTO belongSecondLevelUnit) {
        this.belongSecondLevelUnit = belongSecondLevelUnit;
    }

    public String getGroupInternalManagementType() {
        return groupInternalManagementType;
    }

    public void setGroupInternalManagementType(String groupInternalManagementType) {
        this.groupInternalManagementType = groupInternalManagementType;
    }

    public int getManagementLevel() {
        return managementLevel;
    }

    public void setManagementLevel(int managementLevel) {
        this.managementLevel = managementLevel;
    }

    public int getSiblingOrderNumber() {
        return siblingOrderNumber;
    }

    public void setSiblingOrderNumber(int siblingOrderNumber) {
        this.siblingOrderNumber = siblingOrderNumber;
    }

    public int getPropertyManagementLevel() {
        return propertyManagementLevel;
    }

    public void setPropertyManagementLevel(int propertyManagementLevel) {
        this.propertyManagementLevel = propertyManagementLevel;
    }

    public boolean isIncludedForFinancialConsolidation() {
        return isIncludedForFinancialConsolidation;
    }

    public void setIncludedForFinancialConsolidation(boolean isIncludedForFinancialConsolidation) {
        this.isIncludedForFinancialConsolidation = isIncludedForFinancialConsolidation;
    }

    public boolean isIncludedForFinancialStatement() {
        return isIncludedForFinancialStatement;
    }

    public void setIncludedForFinancialStatement(boolean isIncludedForFinancialStatement) {
        this.isIncludedForFinancialStatement = isIncludedForFinancialStatement;
    }

    public String getGroupBrandUsageAuthorization() {
        return groupBrandUsageAuthorization;
    }

    public void setGroupBrandUsageAuthorization(String groupBrandUsageAuthorization) {
        this.groupBrandUsageAuthorization = groupBrandUsageAuthorization;
    }

    // add by huyong
    @JsonIgnore
    public java.lang.String getGroupInternalType() {
        return groupInternalManagementType;
    }

    public void setGroupInternalType(java.lang.String groupInternalManagementType) {
        this.groupInternalManagementType = groupInternalManagementType;
    }

    public void setIsIncludedForConsCode(java.lang.String isIncludedForConsCode) {
        this.isIncludedForFinancialConsolidation = "1".equals(isIncludedForConsCode);
    }

    public void setIsIncludedForStatCode(java.lang.String isIncludedForStatCode) {
        this.isIncludedForFinancialStatement = "1".equals(isIncludedForStatCode);
    }

    @JsonIgnore
    public java.lang.String getGroupBrandAuthorizatio() {
        return groupBrandUsageAuthorization;
    }

    public void setGroupBrandAuthorizatio(java.lang.String groupBrandUsageAuthorization) {
        this.groupBrandUsageAuthorization = groupBrandUsageAuthorization;
    }
}
